Skip to main content
Dir.prototype.[Symbol.asyncIterator] - fs - Node documentation
method Dir.prototype.[Symbol.asyncIterator]

Usage in Deno

import { Dir } from "node:fs";
Dir.prototype.[Symbol.asyncIterator](): AsyncIterableIterator<Dirent>

Asynchronously iterates over the directory via readdir(3) until all entries have been read.

Return Type

AsyncIterableIterator<Dirent>